package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/7.
 */
@HttpInlet(Net.MONERY)
public class PostMonery extends WHAsyPost<PostMonery.Info> {

    public String driverid = "";
    public String page = "";

    public PostMonery(String driverid, String page, AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.driverid = driverid;
        this.page = page;
    }


    protected Info parser(JSONObject object) {

        Info info=new Info();

        try {
            info.message=object.getString("message");
            if(info.message.equals("1")){
                info.account=object.getString("account");
                info.jsonArray=object.getJSONArray("list");
                info.ispage=object.getString("ispage");
                info.nextpage=object.getString("nextpage");

            }else{

            }
            return   info;
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static class Info {
        public String message = "";
        public String account = "";
        public JSONArray  jsonArray;
        public  String  ispage="";
        public  String  nextpage="";
    }
}
